<template>
	<view class="v-home-page" :style="{ '--bg-image': `url(${ materialBg})` }">
		<view :style="{ height: navTop + 'px' }"></view>
		<view id="barTitle" :style="{ opacity: opacityStyle, height: heightSystemss+Number(50) + 'px' }"
			v-show="!hiddenModel">
			<text>关键词创作</text>
		</view>

		<view class="flex-start-center " style="color:#333333" @click="navBack()">

			<uni-icons style="margin-top: 7rpx;" color="#333333" type="left" size="20"></uni-icons>
			<text style="color: 333333;font-size: 33rpx;"> 关键词创作</text>
		</view>

		<view class="margin-bottom_30rpx">

		</view>
		<uv-steps :current="current" dot>
			<uv-steps-item title="第一步" desc="配置文案生成"></uv-steps-item>
			<uv-steps-item title="第二步" desc="选择视频素材"></uv-steps-item>
			<uv-steps-item title="第三步" desc="配置视频样式"></uv-steps-item>
		</uv-steps>

		<view class="CopywritingType">
			<view class="flex-between">
				<view class="flex-columns padding-bottom_15rpx " style="margin-right: 60rpx;">
					<view class="margin-bottom_20rpx flex-align-center ">

						<view class="font-size_32rpx color333">推广类型</view>
						<span class="must">*</span>
					</view>
					<view class="Type">
						<picker mode="selector" @change="bindPickerChange2" :range="groupList" :range-key="'groupName'">
							<input type="text" disabled v-model="form.type" class="input-frame3" placeholder="请选择推广类型"
								placeholder-class="placeholder" />
							<image class="matrix-20" :src="matrix20"></image>
						</picker>
					</view>

				</view>
				<view class="flex-columns padding-bottom_15rpx">
					<view class="margin-bottom_20rpx flex-align-center">

						<view class="font-size_32rpx color333">生成条数</view>
						<span class="must">*</span>
					</view>
					<input type="number" v-model="form.rows" @input="rowInput(form.rows)" class="input-frame3"
						placeholder="请输入生成条数" placeholder-class="placeholder" />
				</view>
			</view>
		</view>
		<view class=" " style="padding: 20rpx;" v-if="id!=8">
			<view class="margin-bottom_20rpx font-weight_bold">
				文案结构类型
				<span class="red-dot" style="color: red;">*</span>
			</view>
			<view class="flex-wrap-flex-start-center">
				<view class="  " :class="structureIndex==index?'activeStructure':'structure'"
					v-for="(item,index) in structure" :key="index" @click="tabIndex(item,index)">

					{{item.name}}


				</view>

			</view>



		</view>

		<view class="list-public ">
			<view class="margin-bottom_20rpx font-weight_bold">
				任务标题
				<span class="red-dot">*</span>
			</view>
			<view class="card ">
				<view class="myNmae">

					<view class="">
						<input class="uni-inputsa" type="text" v-model="form.name" placeholder="请输入任务标题" />
					</view>


				</view>

			</view>



		</view>
		<!-- // 1 业务营销  2.团购带券 3. 品牌营销 4.门店营销 5.活动营销 6.展会营销 7.电商带货 -->
		<view class="list-public " v-if="id==1">
			<view class="margin-bottom_20rpx font-weight_bold">
				企业类型
				<span class="red-dot">*</span>
			</view>
			<view class="card ">
				<view class="myNmae">

					<view class="">
						<input class="uni-inputsa" type="text" v-model="form.business" placeholder="例如:中式养生" />
					</view>


				</view>

			</view>

		</view>

		<view class="list-public " v-if="id==1">
			<view class="margin-bottom_20rpx font-weight_bold">
				选择城市
				<span class="red-dot">*</span>
			</view>
			<view class="card ">
				<view class="myNmae">

					<view class="">
						<input class="uni-inputsa" type="text" v-model="form.city" placeholder="例如:广州" />
					</view>


				</view>

			</view>

		</view>
		<view class="list-public " v-if="id==1">
			<view class="margin-bottom_20rpx font-weight_bold">
				主营业务
				<span class="red-dot">*</span>
			</view>
			<view class="card ">
				<view class="myNmae">

					<view class="">
						<input class="uni-inputsa" type="text" v-model="form.product" placeholder="例如:中药面膜、艾灸、按摩" />
					</view>


				</view>

			</view>

		</view>
		<view class="textarea-box margin-top_30rpx" v-if="id==1">
			<textarea placeholder-style="font-size:30rpx" v-model="form.keywords"
				placeholder="例如:从中医角度为顾客提供皮肤护理和美容建议，注重内调外养相结合" maxlength="500" style="height: 100%;padding-top:50rpx" />

			<view class="margin-bottom_20rpx font-weight_bold textareaTitle">
				服务亮点
				<span class="red-dot">*</span>
			</view>


		</view>

		<!-- // 1 业务营销  2.团购带券 3. 品牌营销 4.门店营销 5.活动营销 6.展会营销 7.电商带货 -->
		<view class="list-public " v-if="id==2">
			<view class="margin-bottom_20rpx font-weight_bold">
				店铺类型
				<span class="red-dot">*</span>
			</view>
			<view class="card ">
				<view class="myNmae">

					<view class="">
						<input class="uni-inputsa" type="text" v-model="form.business" placeholder="例如:火锅店" />
					</view>


				</view>

			</view>

		</view>
		<view class="list-public " v-if="id==2">
			<view class="margin-bottom_20rpx font-weight_bold">
				店铺名称
				<span class="red-dot">*</span>
			</view>
			<view class="card ">
				<view class="myNmae">

					<view class="">
						<input class="uni-inputsa" type="text" v-model="form.company" placeholder="例如:海底捞" />
					</view>


				</view>

			</view>

		</view>
		<view class="list-public " v-if="id==2">
			<view class="margin-bottom_20rpx font-weight_bold">
				店铺位置
				<span class="red-dot">*</span>
			</view>
			<view class="card ">
				<view class="myNmae">

					<view class="">
						<input class="uni-inputsa" type="text" v-model="form.address" placeholder="例如:坂田街道23号" />
					</view>


				</view>

			</view>

		</view>
		<view class="list-public " v-if="id==2">
			<view class="margin-bottom_20rpx font-weight_bold">
				套餐名称
				<span class="red-dot">*</span>
			</view>
			<view class="card ">
				<view class="myNmae">

					<view class="">
						<input class="uni-inputsa" type="text" v-model="form.product" placeholder="例如:188火锅双人套餐" />
					</view>


				</view>

			</view>

		</view>
		<view class="list-public " v-if="id==2">
			<view class="margin-bottom_20rpx font-weight_bold">
				套餐原价
				<span class="red-dot">*</span>
			</view>
			<view class="card ">
				<view class="myNmae">

					<view class="">
						<input class="uni-inputsa" type="text" v-model="form.price" placeholder="例如:原价399" />
					</view>


				</view>

			</view>

		</view>
		<view class="list-public " v-if="id==2">
			<view class="margin-bottom_20rpx font-weight_bold">
				套餐团购价
				<span class="red-dot">*</span>
			</view>
			<view class="card ">
				<view class="myNmae">

					<view class="">
						<input class="uni-inputsa" type="text" v-model="form.group" placeholder="例如:套餐团购价299" />
					</view>


				</view>

			</view>

		</view>
		<view class="textarea-box margin-top_30rpx" v-if="id==2">
			<textarea placeholder-style="font-size:30rpx" v-model="form.keywords" placeholder="例如:鸳鸯锅底、特色牛肉、羊肉等20种菜品"
				maxlength="500" style="height: 100%;padding-top:50rpx" />

			<view class="margin-bottom_20rpx font-weight_bold textareaTitle">
				套餐内容
				<span class="red-dot">*</span>
			</view>


		</view>

		<!-- // 1 业务营销  2.团购带券 3. 品牌营销 4.门店营销 5.活动营销 6.展会营销 7.电商带货 -->
		<view class="list-public " v-if="id==3">
			<view class="margin-bottom_20rpx font-weight_bold">
				品牌名称
				<span class="red-dot">*</span>
			</view>
			<view class="card ">
				<view class="myNmae">

					<view class="">
						<input class="uni-inputsa" type="text" v-model="form.company" placeholder="例如:耐克" />
					</view>


				</view>

			</view>

		</view>

		<view class="list-public " v-if="id==3">
			<view class="margin-bottom_20rpx font-weight_bold">
				选择城市
				<span class="red-dot">*</span>
			</view>
			<view class="card ">
				<view class="myNmae">

					<view class="">
						<input class="uni-inputsa" type="text" v-model="form.city" placeholder="例如:广州" />
					</view>


				</view>

			</view>

		</view>
		<view class="list-public " v-if="id==3">
			<view class="margin-bottom_20rpx font-weight_bold">
				主营特色
				<span class="red-dot">*</span>
			</view>
			<view class="card ">
				<view class="myNmae">

					<view class="">
						<input class="uni-inputsa" type="text" v-model="form.product" placeholder="例如:运动鞋，运动装，包包等" />
					</view>


				</view>

			</view>

		</view>



		<!-- // 1 业务营销  2.团购带券 3. 品牌营销 4.门店营销 5.活动营销 6.展会营销 7.电商带货 -->
		<view class="list-public " v-if="id==4">
			<view class="margin-bottom_20rpx font-weight_bold">
				店铺类型
				<span class="red-dot">*</span>
			</view>
			<view class="card ">
				<view class="myNmae">

					<view class="">
						<input class="uni-inputsa" type="text" v-model="form.business" placeholder="例如:火锅店" />
					</view>


				</view>

			</view>

		</view>

		<view class="list-public " v-if="id==4">
			<view class="margin-bottom_20rpx font-weight_bold">
				店铺名称
				<span class="red-dot">*</span>
			</view>
			<view class="card ">
				<view class="myNmae">

					<view class="">
						<input class="uni-inputsa" type="text" v-model="form.company" placeholder="例如:海底捞" />
					</view>


				</view>

			</view>

		</view>
		<view class="list-public " v-if="id==4">
			<view class="margin-bottom_20rpx font-weight_bold">
				所在城市
				<span class="red-dot">*</span>
			</view>
			<view class="card ">
				<view class="myNmae">

					<view class="">
						<input class="uni-inputsa" type="text" v-model="form.city" placeholder="例如:北京" />
					</view>


				</view>

			</view>

		</view>

		<view class="list-public " v-if="id==4">
			<view class="margin-bottom_20rpx font-weight_bold">
				所在位置
				<span class="red-dot">*</span>
			</view>
			<view class="card ">
				<view class="myNmae">

					<view class="">
						<input class="uni-inputsa" type="text" v-model="form.address" placeholder="例如:坂田街道23号" />
					</view>


				</view>

			</view>

		</view>

		<view class="list-public " v-if="id==4">
			<view class="margin-bottom_20rpx font-weight_bold">
				主营特色
				<span class="red-dot">*</span>
			</view>
			<view class="card ">
				<view class="myNmae">

					<view class="">
						<input class="uni-inputsa" type="text" v-model="form.product"
							placeholder="例如:鸳露锅底、特色牛肉、羊肉等20种莱品" />
					</view>


				</view>

			</view>

		</view>
		<view class="list-public " v-if="id==4">
			<view class="margin-bottom_20rpx font-weight_bold">
				门店亮点
				<span class="red-dot">*</span>
			</view>
			<view class="card ">
				<view class="myNmae">

					<view class="">
						<input class="uni-inputsa" type="text" v-model="form.keywords" placeholder="例如·情侣主题装修" />
					</view>


				</view>

			</view>

		</view>
		<!-- // 1 业务营销  2.团购带券 3. 品牌营销 4.门店营销 5.活动营销 6.展会营销 7.电商带货 -->
		<view class="list-public " v-if="id==5">
			<view class="margin-bottom_20rpx font-weight_bold">
				店铺类型
				<span class="red-dot">*</span>
			</view>
			<view class="card ">
				<view class="myNmae">

					<view class="">
						<input class="uni-inputsa" type="text" v-model="form.business" placeholder="例如:火锅店" />
					</view>


				</view>

			</view>

		</view>
		<view class="list-public " v-if="id==5">
			<view class="margin-bottom_20rpx font-weight_bold">
				店铺名称
				<span class="red-dot">*</span>
			</view>
			<view class="card ">
				<view class="myNmae">

					<view class="">
						<input class="uni-inputsa" type="text" v-model="form.company" placeholder="例如:海底捞" />
					</view>


				</view>

			</view>

		</view>
		<view class="list-public " v-if="id==5">
			<view class="margin-bottom_20rpx font-weight_bold">
				所在城市
				<span class="red-dot">*</span>
			</view>
			<view class="card ">
				<view class="myNmae">

					<view class="">
						<input class="uni-inputsa" type="text" v-model="form.city" placeholder="例如:广州" />
					</view>


				</view>

			</view>

		</view>

		<view class="list-public " v-if="id==5">
			<view class="margin-bottom_20rpx font-weight_bold">
				所在位置
				<span class="red-dot">*</span>
			</view>
			<view class="card ">
				<view class="myNmae">

					<view class="">
						<input class="uni-inputsa" type="text" v-model="form.address" placeholder="例如:我四街道23号" />
					</view>


				</view>

			</view>

		</view>
		<view class="list-public " v-if="id==5">
			<view class="margin-bottom_20rpx font-weight_bold">
				活动主题
				<span class="red-dot">*</span>
			</view>
			<view class="card ">
				<view class="myNmae">

					<view class="">
						<input class="uni-inputsa" type="text" v-model="form.extend" placeholder="例如:情人节送大礼" />
					</view>


				</view>

			</view>

		</view>

		<view class="list-public " v-if="id==5">
			<view class="margin-bottom_20rpx font-weight_bold">
				主营产品
				<span class="red-dot">*</span>
			</view>
			<view class="card ">
				<view class="myNmae">

					<view class="">
						<input class="uni-inputsa" type="text" v-model="form.product" placeholder="例如:特色火锅底料" />
					</view>


				</view>

			</view>

		</view>
		<view class="list-public " v-if="id==5">
			<view class="margin-bottom_20rpx font-weight_bold">
				活动内容
				<span class="red-dot">*</span>
			</view>
			<view class="card ">
				<view class="myNmae">

					<view class="">
						<input class="uni-inputsa" type="text" v-model="form.keywords" placeholder="例如:情侣就餐送特殊大礼" />
					</view>


				</view>

			</view>

		</view>

		<!-- // 1 业务营销  2.团购带券 3. 品牌营销 4.门店营销 5.活动营销 6.展会营销 7.电商带货 -->
		<view class="list-public " v-if="id==6">
			<view class="margin-bottom_20rpx font-weight_bold">
				展会名称
				<span class="red-dot">*</span>
			</view>
			<view class="card ">
				<view class="myNmae">

					<view class="">
						<input class="uni-inputsa" type="text" v-model="form.company" placeholder="例如:建博会" />
					</view>


				</view>

			</view>

		</view>

		<view class="list-public " v-if="id==6">
			<view class="margin-bottom_20rpx font-weight_bold">
				展会时间
				<span class="red-dot">*</span>
			</view>
			<view class="card ">
				<view class="myNmae">

					<view class="">
						<input class="uni-inputsa" type="text" v-model="form.extend" placeholder="例如:6月1日~6月7日" />
					</view>


				</view>

			</view>

		</view>

		<view class="list-public " v-if="id==6">
			<view class="margin-bottom_20rpx font-weight_bold">
				展会所在城市
				<span class="red-dot">*</span>
			</view>
			<view class="card ">
				<view class="myNmae">

					<view class="">
						<input class="uni-inputsa" type="text" v-model="form.city" placeholder="例如:深圳" />
					</view>


				</view>

			</view>

		</view>

		<view class="list-public " v-if="id==6">
			<view class="margin-bottom_20rpx font-weight_bold">
				展会地点
				<span class="red-dot">*</span>
			</view>
			<view class="card ">
				<view class="myNmae">

					<view class="">
						<input class="uni-inputsa" type="text" v-model="form.address" placeholder="例如:深圳会展馆" />
					</view>


				</view>

			</view>

		</view>

		<view class="list-public " v-if="id==6">
			<view class="margin-bottom_20rpx font-weight_bold">
				参展品牌
				<span class="red-dot">*</span>
			</view>
			<view class="card ">
				<view class="myNmae">

					<view class="">
						<input class="uni-inputsa" type="text" v-model="form.business" placeholder="例如:汉诺医疗" />
					</view>


				</view>

			</view>

		</view>

		<view class="list-public " v-if="id==6">
			<view class="margin-bottom_20rpx font-weight_bold">
				所在展位号
				<span class="red-dot">*</span>
			</view>
			<view class="card ">
				<view class="myNmae">

					<view class="">
						<input class="uni-inputsa" type="text" v-model="form.keywords" placeholder="例如:汉诺医疗" />
					</view>


				</view>

			</view>

		</view>

		<view class="list-public " v-if="id==6">
			<view class="margin-bottom_20rpx font-weight_bold">
				主营产品
				<span class="red-dot">*</span>
			</view>
			<view class="card ">
				<view class="myNmae">

					<view class="">
						<input class="uni-inputsa" type="text" v-model="form.product" placeholder="例如·健康科技" />
					</view>


				</view>

			</view>

		</view>


		<!-- // 1 业务营销  2.团购带券 3. 品牌营销 4.门店营销 5.活动营销 6.展会营销 7.电商带货 -->
		<view class="list-public " v-if="id==7">
			<view class="margin-bottom_20rpx font-weight_bold">
				商品名称
				<span class="red-dot">*</span>
			</view>
			<view class="card ">
				<view class="myNmae">

					<view class="">
						<input class="uni-inputsa" type="text" v-model="form.product" placeholder="例如:维生素聚合片" />
					</view>


				</view>

			</view>

		</view>
		<view class="list-public " v-if="id==7">
			<view class="margin-bottom_20rpx font-weight_bold">
				商品亮点
				<span class="red-dot">*</span>
			</view>
			<view class="card ">
				<view class="myNmae">

					<view class="">
						<input class="uni-inputsa" type="text" v-model="form.keywords" placeholder="例如:补充人体一天所需的维生素" />
					</view>


				</view>

			</view>

		</view>


		<view class="list-public " v-if="id==7">
			<view class="margin-bottom_20rpx font-weight_bold">
				适用人群
				<span class="red-dot">*</span>
			</view>
			<view class="card ">
				<view class="myNmae">

					<view class="">
						<input class="uni-inputsa" type="text" v-model="form.extend" placeholder="例如:小孩、老人" />
					</view>


				</view>

			</view>

		</view>
		<!-- // 1 业务营销  2.团购带券 3. 品牌营销 4.门店营销 5.活动营销 6.展会营销 7.电商带货 -->

		<view class="textarea-box margin-top_30rpx" v-if="id==8">
			<textarea placeholder-style="font-size:30rpx" v-model="form.keywords" placeholder="例如:关键词如：小程序开发"
				maxlength="500" style="height: 100%;padding-top:50rpx" />

			<view class="margin-bottom_20rpx font-weight_bold textareaTitle">
				关键词内容
				<span class="red-dot">*</span>
			</view>


		</view>







		<view class=" " style="padding: 20rpx;">
			<view class="margin-bottom_20rpx font-weight_bold">
				文字长度
				<span class="red-dot" style="color: red;">*</span>
			</view>
			<view class="flex-wrap-flex-start-center">
				<view class="  " :style="{marginRight:index==3?' 0rpx':'20rpx' }"
					:class="numIndex==index?'activeStructureNum':'structureNum'" v-for="(item,index) in digit"
					:key="index" @click="tabIndexNum(item,index)">

					<text v-if="index<3">{{item.num+'字'}}</text>
					<text v-else>{{customizeNum?customizeNum:'自定义'}}</text>


				</view>

			</view>



		</view>

		<sunui-popup ref="customizePop">
			<template v-slot:content>

				<view class="serviceItemsContain ">
					<view class="top flex-between">
						<view class="">

						</view>
						<text>自定义字数</text>
						<uni-icons @click='closeWriteOffIcon()' class="uniIcon" type="closeempty" size="22"
							style="color: #07070791;">
						</uni-icons>
					</view>

					<view class="card margin-bottom_50rpx">
						<view class="myNmae">

							<view class="">
								<input class="uni-inputsa" type="number" v-model="form.length" placeholder="请输入自定义字数" />
							</view>


						</view>

					</view>

					<view class="PublishTags flex" @click="customizePopFn()">
						确定
					</view>

				</view>

			</template>
		</sunui-popup>



		<view class="height80">

		</view>




		<view class="c-but flex" @click="but()">一键分析: {{'('+"算力："+(rowCopywriter_tally).toFixed(2)+')'}}</view>



	</view>
</template>

<script>
	export default {
		data() {
			return {
				hiddenModel: true, //显示影藏
				opacityStyle: 0, //透明度
				heightSystemss: "",
				navTop: '',
				materialBg: this.$imgs.violet,
				current: 0,
				numIndex: 0,
				matrix20: 'https://yuntt.weijuyunke.com/yunttXcxImage/matrix/20.png',
				// 1 业务营销  2.团购带券 3. 品牌营销 4.门店营销 5.活动营销 6.展会营销 7.电商带货
				id: '1',

				digit: [{
						id: 1,
						num: 150
					},
					{
						id: 2,
						num: 300
					},
					{
						id: 3,
						num: 500
					},
					{
						id: 4,
						num: '自定义'
					}
				],

				groupList: [{
					id: 1,
					groupName: '业务营销'

				}, {
					id: 2,
					groupName: '团购带券'

				}, {
					id: 3,
					groupName: '品牌营销'

				}, {
					id: 4,
					groupName: '门店营销'

				}, {
					id: 5,
					groupName: '活动营销'

				}, {
					id: 6,
					groupName: '展会营销'

				}, {
					id: 7,
					groupName: '电商带货'

				}, {
					id: 8,
					groupName: '其他'

				}],
				structure: [{
						id: 1,
						name: '悬念互动型',

					},
					{
						id: 2,
						name: '客户见证型',

					},
					{
						id: 3,
						name: '知识科普型',

					},
					{
						id: 4,
						name: '场景再现型',

					},
					{
						id: 5,
						name: '痛点激发型',

					},
					{
						id: 6,
						name: '开门见山型',

					}
				],
				form: {
					name: '',

					// 文案结构类型
					structure: "悬念互动型",
					// 亮点描述
					keywords: '',
					// 商家类型
					business: '',
					// 商家名称
					company: '',
					// 展会时间
					extend: '',
					// 所在城市
					city: '',
					// 所在地址
					address: '',
					//   产品
					product: '',
					// 原价
					price: '',
					//  团购价
					group: '',
					rows: '',
					// 长度
					length: '150',

					type: '业务营销',

					// 
				},

				copyTypeInfo: {},
				editCopyTypeInfo: {},
				structureIndex: 0,
				customizeNum: '',
				tallySet: uni.getStorageSync('tallySet'),
				user: uni.getStorageSync('user'),
				rowCopywriter_tally: 0,
				memberSetObj:{}




			}
		},
		onLoad(options) {
			const app = getApp();
			this.navTop = app.globalData.navTop;

			this.createdgetSystemInfo()
			this.userInfos()
			this.tallySetFn()
			this.memberSetFn()


			if (options.obj) {
				this.editCopyTypeInfo = JSON.parse((decodeURIComponent(options.obj)));

				console.log(this.editCopyTypeInfo)

				this.$sun.assignObject(this.form, {
					...this.editCopyTypeInfo
				})
			}







		},
		onPageScroll(ev) {


			if (ev.scrollTop > 10) {
				let opacity = ev.scrollTop / 140

				// this.opacityStyle = opacity > 1 ? 1 : opacity
				this.opacityStyle = 1
				this.hiddenModel = false
				// this.createdgetSystemInfo();

			} else {
				this.hiddenModel = true
			}
		},
		computed: {


		},
		methods: {
			changeInput(e){
				console.log(e)
				this.name=e.detail.value
				
				setTimeout(() => {
					this.$nextTick(() => {
						this.mescroll?.resetUpScroll();
					})
				}, 500)
			},
			
			closeWriteOffIcon() {
				this.$refs.customizePop.close()
			},
		
			async userInfos() {
				const result = await this.$http.get({
					url: this.$api.userInfo,
					data: {
						// 用户id
						uid: uni.getStorageSync('uid'),
						// 上级id
						// pid: ''
					}
				});
				if (result.errno == 0) {
					this.user = result.data;

					uni.setStorageSync('user', result.data);


				}
			},
			async tallySetFn() {
				const result = await this.$http.get({
					url: this.$api.tallySet,

				});
				if (result.errno == 0) {
					console.log(result.data)
					this.rowCopywriter_tally = Number(result.data.copywriter_tally)
					uni.setStorageSync('tallySet', result.data);



				} else {
					this.$sun.toast(result.message, 'none')
				}
			},
			createdgetSystemInfo() {
				let menuButtonObject = uni.getMenuButtonBoundingClientRect(); //获取菜单按钮（右上角胶囊按钮）的布局位置信息。坐标信息以屏幕左上角为原点。
				uni.getSystemInfo({
					//获取系统信息
					success: res => {
						let navHeight = menuButtonObject.height + (menuButtonObject.top - res
							.statusBarHeight) * 2; //导航栏高度=菜单按钮高度+（菜单按钮与顶部距离-状态栏高度）*2
						this.heightSystemss = navHeight;
						console.log(navHeight, '==========================')

					},
					fail(err) {
						console.log(err);
					}
				});
			},
			tabIndex(item, index) {
				// // 亮点描述
				// keywords: '',
				// // 商家类型
				// business: '',
				// // 商家名称
				// company: '',
				// // 所在城市
				// city: '',
				// // 所在地址
				// address: '',
				// //   产品
				// product: '',
				// // 原价
				// price: '',
				// //  团购价
				// group: '',
				// rows: '',






				console.log(item, index)
				this.structureIndex = index

				this.form.structure = this.structure[index].name
			},
			rowInput(e) {
				console.log(e)
				if (e) {
					console.log(e)

					this.rowCopywriter_tally = Number(this.tallySet.copywriter_tally) * Number(e)

				} else {
					this.rowCopywriter_tally = Number(this.tallySet.copywriter_tally)
				}

			},
			customizePopFn() {
				this.customizeNum = this.form.length
				this.$refs.customizePop.close()
			},
			tabIndexNum(item, index) {
				console.log(item, index)
				if (index == 3) {
					this.form.length = ''
					// 自定义
					this.$refs.customizePop.show({
						anim: 'bottom',
						position: 'bottom',
						shadeClose: false, //false使用户不能点击其它关闭页面
						topclose: false,
						zIndex: 99999
					});
					this.numIndex = index

				} else {
					this.numIndex = index
					this.form.length = this.digit[index].num
					this.customizeNum = ''
				}
			},
			navBack() {
				this.$sun.navBack()
			},
			//账号状态
			bindPickerChange2(e) {

				this.form.keywords = ''
				this.form.business = ''
				this.form.company = ''
				this.form.city = ''
				this.form.address = ''
				this.form.product = ''

				this.form.price = ''
				this.form.group = ''
				this.form.rows = ''
				this.form.extend = ''

				console.log("---->", e);
				this.form.type = this.groupList[e.detail.value].groupName

				this.id = this.groupList[e.detail.value].id
				if (this.id == 8) {
					this.form.structure = ''
				}

			},
            async memberSetFn() {
            	const result = await this.$http.get({
            		url: this.$api.memberSet,
            		data: {
            
            
            		}
            	});
            	if (result.errno == 0) {
            
            		this.memberSetObj = result.data
            
            		console.log(result.data)
            
            	}
            },
			async but() {


				if (this.user.is_member == 0&&this.memberSetObj.is_open==1) {
					uni.showModal({
						title: '温馨提示',
						content: '你当前不是会员，请开通会员后享受该功能',
						confirmText: '开通会员',
						confirmColor: '#4A5EFF',
						success: async (res) => {
							if (res.confirm) {


								this.$sun.navGo('/pages/contactUs/memberCenter')

							} else if (res.cancel) {

							}
						}
					});
				} else {
					if (this.id == 1) {

						if (!this.form.name) {
							this.$sun.toast('请输入任务标题', 'none')
							return
						}
						if (!this.form.rows) {
							this.$sun.toast('请输入生成条数', 'none')
							return
						}
						if (!this.form.structure) {
							this.$sun.toast('请选择文案结构类型', 'none')

							return
						}
						if (!this.form.length) {
							this.$sun.toast('请选择字数', 'none')

							return
						}
						if (!this.form.type) {
							this.$sun.toast('请选择推广类型', 'none')

							return
						}

						if (!this.form.business) {
							this.$sun.toast('请输入企业类型', 'none')

							return
						}

						if (!this.form.city) {
							this.$sun.toast('请输入城市', 'none')

							return
						}
						if (!this.form.product) {
							this.$sun.toast('请输入主营业务', 'none')

							return
						}
						if (!this.form.keywords) {
							this.$sun.toast('请输入服务壳点', 'none')

							return
						}
					}

					if (this.id == 2) {
						if (!this.form.name) {
							this.$sun.toast('请输入任务标题', 'none')
							return
						}
						if (!this.form.rows) {
							this.$sun.toast('请输入生成条数', 'none')
							return
						}
						if (!this.form.structure) {
							this.$sun.toast('请选择文案结构类型', 'none')

							return
						}
						if (!this.form.length) {
							this.$sun.toast('请选择字数', 'none')

							return
						}
						if (!this.form.type) {
							this.$sun.toast('请选择推广类型', 'none')

							return
						}

						if (!this.form.business) {
							this.$sun.toast('请输入店铺类型', 'none')

							return
						}

						if (!this.form.company) {
							this.$sun.toast('请输入店铺名称', 'none')

							return
						}
						if (!this.form.address) {
							this.$sun.toast('请输入店铺位置', 'none')

							return
						}
						if (!this.form.product) {
							this.$sun.toast('请输入套餐名称', 'none')

							return
						}
						if (!this.form.keywords) {
							this.$sun.toast('请输入套餐内容', 'none')

							return
						}
						if (!this.form.price) {
							this.$sun.toast('请输入套餐原价', 'none')

							return
						}

						if (!this.form.group) {
							this.$sun.toast('请输入套餐团购价', 'none')

							return
						}

					}

					if (this.id == 3) {
						if (!this.form.name) {
							this.$sun.toast('请输入任务标题', 'none')
							return
						}
						if (!this.form.rows) {
							this.$sun.toast('请输入生成条数', 'none')
							return
						}
						if (!this.form.structure) {
							this.$sun.toast('请选择文案结构类型', 'none')

							return
						}
						if (!this.form.length) {
							this.$sun.toast('请选择字数', 'none')

							return
						}
						if (!this.form.type) {
							this.$sun.toast('请选择推广类型', 'none')

							return
						}



						if (!this.form.company) {
							this.$sun.toast('请输入品牌名称 ', 'none')

							return
						}
						if (!this.form.city) {
							this.$sun.toast('请输入所在城市', 'none')

							return
						}
						if (!this.form.product) {
							this.$sun.toast('请输入主营特色“', 'none')

							return
						}


					}

					if (this.id == 4) {
						if (!this.form.name) {
							this.$sun.toast('请输入任务标题', 'none')
							return
						}
						if (!this.form.rows) {
							this.$sun.toast('请输入生成条数', 'none')
							return
						}
						if (!this.form.structure) {
							this.$sun.toast('请选择文案结构类型', 'none')

							return
						}
						if (!this.form.length) {
							this.$sun.toast('请选择字数', 'none')

							return
						}
						if (!this.form.type) {
							this.$sun.toast('请选择推广类型', 'none')

							return
						}

						if (!this.form.business) {
							this.$sun.toast('请输入店铺类型', 'none')

							return
						}

						if (!this.form.company) {
							this.$sun.toast('请输入品牌名称 ', 'none')

							return
						}
						if (!this.form.city) {
							this.$sun.toast('请输入所在城市', 'none')

							return
						}
						if (!this.form.product) {
							this.$sun.toast('请输入主营特色“', 'none')

							return
						}
						if (!this.form.keywords) {
							this.$sun.toast('请输入门店亮点“', 'none')

							return
						}

					}

					if (this.id == 5) {
						if (!this.form.name) {
							this.$sun.toast('请输入任务标题', 'none')
							return
						}
						if (!this.form.rows) {
							this.$sun.toast('请输入生成条数', 'none')
							return
						}
						if (!this.form.structure) {
							this.$sun.toast('请选择文案结构类型', 'none')

							return
						}
						if (!this.form.length) {
							this.$sun.toast('请选择字数', 'none')

							return
						}
						if (!this.form.type) {
							this.$sun.toast('请选择推广类型', 'none')

							return
						}

						if (!this.form.business) {
							this.$sun.toast('请输入店铺类型', 'none')

							return
						}

						if (!this.form.company) {
							this.$sun.toast('请输入店铺名称 ', 'none')

							return
						}
						if (!this.form.city) {
							this.$sun.toast('请输入所在城市', 'none')

							return
						}
						if (!this.form.address) {
							this.$sun.toast('请输入所在位置', 'none')

							return
						}
						if (!this.form.product) {
							this.$sun.toast('请输入主营产品', 'none')

							return
						}
						if (!this.form.extend) {
							this.$sun.toast('请输入活动主题', 'none')

							return
						}
						if (!this.form.keywords) {
							this.$sun.toast('请输入活动内容', 'none')

							return
						}

					}

					if (this.id == 6) {
						if (!this.form.name) {
							this.$sun.toast('请输入任务标题', 'none')
							return
						}
						if (!this.form.rows) {
							this.$sun.toast('请输入生成条数', 'none')
							return
						}
						if (!this.form.structure) {
							this.$sun.toast('请选择文案结构类型', 'none')

							return
						}
						if (!this.form.length) {
							this.$sun.toast('请选择字数', 'none')

							return
						}
						if (!this.form.type) {
							this.$sun.toast('请选择推广类型', 'none')

							return
						}

						if (!this.form.company) {
							this.$sun.toast('请输入展会名称', 'none')

							return
						}

						if (!this.form.extend) {
							this.$sun.toast('请输入展会时间 ', 'none')

							return
						}
						if (!this.form.city) {
							this.$sun.toast('请输入所在城市', 'none')

							return
						}
						if (!this.form.address) {
							this.$sun.toast('请输入展会地点', 'none')

							return
						}
						if (!this.form.business) {
							this.$sun.toast('请输入参展品牌', 'none')

							return
						}
						if (!this.form.product) {
							this.$sun.toast('请输入主营产品', 'none')

							return
						}
						if (!this.form.keywords) {
							this.$sun.toast('请输入所在展位号', 'none')

							return
						}

					}

					if (this.id == 7) {
						if (!this.form.name) {
							this.$sun.toast('请输入任务标题', 'none')
							return
						}
						if (!this.form.rows) {
							this.$sun.toast('请输入生成条数', 'none')
							return
						}
						if (!this.form.structure) {
							this.$sun.toast('请选择文案结构类型', 'none')

							return
						}
						if (!this.form.length) {
							this.$sun.toast('请选择字数', 'none')

							return
						}
						if (!this.form.type) {
							this.$sun.toast('请选择推广类型', 'none')

							return
						}

						if (!this.form.product) {
							this.$sun.toast('请输入商品名称', 'none')

							return
						}

						if (!this.form.keywords) {
							this.$sun.toast('请输入商品亮点 ', 'none')

							return
						}
						if (!this.form.extend) {
							this.$sun.toast('请输入适用人群', 'none')

							return
						}


					}

					if (this.id == 8) {
						if (!this.form.name) {
							this.$sun.toast('请输入任务标题', 'none')
							return
						}
						if (!this.form.rows) {
							this.$sun.toast('请输入生成条数', 'none')
							return
						}

						if (!this.form.length) {
							this.$sun.toast('请选择字数', 'none')

							return
						}
						if (!this.form.type) {
							this.$sun.toast('请选择推广类型', 'none')

							return
						}


						if (!this.form.keywords) {
							this.$sun.toast('请输入商品亮点 ', 'none')

							return
						}



					}

					uni.showLoading({
						title: '加载中...',
						mask: true
					});
					if (this.editCopyTypeInfo.id) {
						this.$sun.navGo('/pagesA/creatCenter/keywordCreation/keywordStepOne?objs=' +
							encodeURIComponent(
								JSON
								.stringify(
									this.editCopyTypeInfo)))
						uni.hideLoading()
					} else {

						console.log(this.form)

						const result = await this.$http.post({
							url: this.$api.keywordAnalysis,
							data: {
								uid: uni.getStorageSync('uid'),
								name: this.form.name,
								length: this.form.length,
								type: this.form.type,
								structure: this.form.structure,
								...this.form



							}
						});
						if (result.errno == 0) {
							uni.hideLoading()

							this.copyTypeInfo = result.data
							this.copyTypeInfo.content = result.data.res
							this.$sun.navGo('/pagesA/creatCenter/keywordCreation/keywordStepOne?obj=' +
								encodeURIComponent(
									JSON.stringify(
										this.copyTypeInfo)))
							this.$sun.toast(result.message, 'none')

							console.log(this.copyTypeInfo)



						} else {
							uni.hideLoading()
							setTimeout(() => {
								this.$sun.toast(result.message, 'none')
							}, 200)

						}
					}

				}









				// 	this.copyTypeInfo = {
				// 		id: 1,
				// 		res: [
				// 			'1.小程序与平台App的共用技术揭秘】#科技生活 #互联网技术 #小程序开发↵↵1. 小程序与平台App共用技术，关键在于API接口的统一和数据的无缝对接。通过标准化接口，实现数据共享和功能调用，让用户在不同平台间无缝切换，提升使用体验。&↵↵2. 利用跨平台开发框架，如React Native或Flutter，可以高效实现小程序与App的代码复用。这种技术不仅节省开发成本，还能确保应用在不同平台上的一致性和稳定性。#跨平台开发 #小程序技术',
				// 			'2. 另一种技术方案是使用WebView组件，将小程序嵌入到App中。开发者可以通过WebView加载小程序的H5页面，利用JavaScript与原生代码进行交互。这种方式虽然性能略逊于原生开发，但能够快速实现小程序与App的共用，降低开发成本'
				// 		]
				// 	}
				// 	console.log(this.copyTypeInfo)

				// 	this.$sun.navGo('/pages/creatCenter/keywordCreation/keywordStepOne?obj='+encodeURIComponent(JSON.stringify(
				// 		this.copyTypeInfo)))
			}

		}
	}
</script>

<style lang="less">
	.v-home-page {
		background-image: (var(--bg-image));
		background-repeat: no-repeat;
		background-size: contain;
		position: relative;
		height: 100vh;
		padding: 20rpx;
		position: relative;


		#barTitle {
			position: fixed;
			width: 750rpx;
			top: 0;
			left: 0;
			background: #fff;
			color: #000000;
			text-align: center;
			font-weight: bold;
			z-index: 9999
		}

		#barTitle>text {
			position: absolute;
			left: 0;
			right: 0;
			bottom: 20rpx
		}

		.serviceItemsContain {
			padding: 0rpx 30rpx 30rpx 30rpx;
			background-color: #fff;

			height: auto;
			overflow-x: auto;

			.textarea-box {
				height: 400rpx;
				padding: 20rpx 0;
			}

			.PublishTags {
				z-index: 99;
				margin-top: 10rpx;
				height: 102rpx;
				border-radius: 20rpx;
				color: #fff;


				bottom: 20rpx;
				background: rgb(120, 93, 246);
			}

			.myNmae {

				background-color: #fff;
				min-width: 50rpx;

				.avatar {
					width: 84rpx;
					height: 84rpx;
				}

				input {
					text-align: left;
				}

				.uni-input {

					height: 100rpx;
				}

				.uni-inputsa {
					width: 100%;
					height: 90rpx;
					border-radius: 20rpx;
					background: rgb(245, 245, 245);
					margin: 20rpx 0;
					padding: 0rpx 20rpx;
				}

				.uni-inputs {
					text-align: left !important;
				}

				.backgroundImg {

					height: 154rpx;


				}

			}





			.top {
				padding: 30rpx 0;
				width: 100%;

				text {
					color: rgb(0, 0, 0);
					font-size: 36rpx;
					font-weight: 400;
				}
			}

		}


		.c-but {

			font-weight: 700;

			padding: 20rpx 40rpx;

			// color: #ffffff;
			width: 90%;
			position: fixed;
			bottom: 40rpx;
			left: 3%;
			border: none;

			z-index: 999;


			border-radius: 20rpx;
			margin: 20rpx;
			text-align: center;
			font-size: 32rpx;
			height: 100rpx;
			margin-top: 30rpx;
			color: #ffffff;
			background: linear-gradient(90deg, #6475FF, #7464FF 100%);
		}

		::v-deep .uv-steps-item__wrapper {
			background-color: transparent !important
		}

		.must {
			color: red;
			margin-left: 8rpx;
		}



		.activeStructure {
			font-size: 21rpx;
			box-sizing: border-box;
			border: 2rpx solid rgba(0, 123, 255, 1);
			border-radius: 20rpx;
			color: rgba(0, 123, 255, 1);
			background: rgba(226, 245, 255, 1);
			padding: 20rpx;
			margin: 0 20rpx 20rpx 0;
		}

		.structure {
			font-size: 21rpx;
			box-sizing: border-box;

			border-radius: 20rpx;

			background: #fff;
			padding: 20rpx;
			margin: 0 20rpx 20rpx 0;
		}

		.activeStructureNum {
			font-size: 21rpx;
			box-sizing: border-box;
			border: 2rpx solid rgba(0, 123, 255, 1);
			border-radius: 20rpx;
			color: rgba(0, 123, 255, 1);
			background: rgba(226, 245, 255, 1);
			padding: 15rpx 35rpx;
			margin: 0 20rpx 20rpx 0;
		}

		.structureNum {
			font-size: 21rpx;
			box-sizing: border-box;

			border-radius: 20rpx;

			background: #fff;
			padding: 15rpx 35rpx;
			margin: 0 20rpx 20rpx 0;
		}

		.list-public {
			border-radius: 20rpx;
			padding: 30rpx;
			margin: 0;
			// margin-top: 50rpx;

			.input-name {
				width: 610rpx;
				padding: 20rpx;
				border: 2rpx solid #d9d9d9;
				border-radius: 10rpx;
			}

			.myNmae {

				background-color: #fff;
				min-width: 50rpx;

				.avatar {
					width: 84rpx;
					height: 84rpx;
				}

				input {
					text-align: left;
				}

				.uni-input {

					height: 100rpx;
				}

				.uni-inputsa {
					width: 94%;
					height: 90rpx;
					border-radius: 20rpx;
					background: rgb(245, 245, 245);
					// margin: 20rpx 0;
					padding: 0rpx 20rpx;
				}

				.uni-inputs {
					text-align: left !important;
				}

				.backgroundImg {

					height: 154rpx;


				}

			}

			.red-dot {
				color: #ff0000;
				margin-left: 10rpx;
			}

			.multiLensList {
				// width: 688rpx;
				// height: 116rpx;
				padding: 20rpx 20rpx;
				border-radius: 20rpx;

				background: rgb(248, 248, 248);

				.icon {
					width: 35rpx;
					height: 35rpx;
				}
			}

			.multiLensImg {
				width: 45.84rpx;
				height: 50rpx;
			}
		}

		.CopywritingType {
			margin-top: 40rpx;
			background-color: #fff;
			border-radius: 20rpx;
			padding: 30rpx;
			width: 710rpx;

			.input-frame3 {
				width: calc(100% - 76rpx);
				border-radius: 20rpx;
				background: rgb(243, 243, 244);
				padding: 24rpx;
				// margin: 0rpx 0 42rpx;
			}

			.Type {
				position: relative;


				.matrix-20 {

					position: absolute;
					right: 48rpx;
					top: 33rpx;
					width: 15rpx;
					height: 20rpx;
					margin-left: auto;
				}

			}


		}

		// 多行文本
		.textarea-box {
			// width: 630rpx;
			border-radius: 20rpx;
			background: #fff;
			padding: 30rpx;
			position: relative;
			height: calc(100vh - 1120rpx);

			.textareaTitle {
				position: absolute;
				top: 20rpx;
			}

			.textarea-color {
				color: #999;
			}

			::v-deep .textarea {
				padding-top: 30rpx !important;
			}

			.red-dot {
				color: #ff0000;
				margin-left: 10rpx;
			}
		}
	}
</style>